

/*

var attribution = new ol.Attribution({
  html: 'Tiles &copy; <a href="http://www.baidu.com">' +
      'National Library of Scotland</a>'
});

var map = new ol.Map({
  target: 'map',
  layers: [
    new ol.layer.Tile({
      source: new ol.source.OSM({
        attributions: [
          new ol.Attribution({
            html: 'Tiles &copy; <a href="http://www.opencyclemap.org/">' +
                'OpenCycleMap</a>'
          }),
          ol.source.OSM.DATA_ATTRIBUTION
        ],
        url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
      })
    }),
    new ol.layer.Tile({
      source: new ol.source.XYZ({
        attributions: [attribution],
        url: 'http://geo.nls.uk/maps/towns/glasgow1857/{z}/{x}/{-y}.png'
      })
    })
  ],
  view: new ol.View2D({
    center: [-472202, 7530279],
    zoom: 12
  })
});

*/


/// <reference path="ol3/ol-whitespace.js" />



window.onload = Init;

function Init()
{
    var map = new ol.Map({
        target: 'map',
        controls: [
           new ol.control.MousePosition(),
           new ol.control.ZoomSlider(),
           new ol.control.ScaleLine(),
           new ol.control.Zoom(),
           new ol.control.ZoomToExtent(),
        ],
        view: new ol.View2D({
            center: [-472202, 7530279],
            zoom: 1
        })
    });


    
    var layer1= new ol.layer.Tile({
        source: new ol.source.OSM({
            url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
        })
    });

    map.addLayer(layer1);


    var layer3 = new ol.layer.Tile({
        source: new ol.source.TileWMS(({
            url: 'http://localhost:6666/geowebcache/service/wms',
            params: { 'LAYERS': 'raster test layer', 'TILED': true },
            extent: [-13884991, 2870341, -7455066, 6338219],
            serverType: 'geoserver'
        }))
    });

    map.addLayer(layer3);

    //var layer2= new ol.layer.Tile({
    //    source: new ol.source.TileWMS({
    //        url: 'http://localhost:6666/geowebcache/service/wms',
    //        params: {
    //            'LAYERS': 'raster test layer',
    //            'FORMAT': 'image/jpeg'
    //        },
    //        serverType: 'mapserver'
    //    })
    //});

   

}


